1   package com.iluwatar;
2   
3   /**
4    * 
5    * Angry state.
6    *
7    */
8   public class AngryState implements State {
9   
10  	private Mammoth mammoth;
11  
12  	public AngryState(Mammoth mammoth) {
13  		this.mammoth = mammoth;
14  	}
15  
16  	@Override
17  	public void observe() {
18  		System.out.println(String.format("%s is furious!", mammoth));
19  	}
20  
21  	@Override
22  	public void onEnterState() {
23  		System.out.println(String.format("%s gets angry!", mammoth));
24  	}
25  
26  }